package com.coding.serivce;

import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

import java.util.concurrent.TimeUnit;

/**
 * -- Created by IntelliJ IDEA.
 * -- REMARK:
 * -- User: tanwei
 * -- Date: 2020/7/5
 * -- Time: 12:32 下午
 * --
 */
@Service
public class AsyncServicer {
    @Async
    public  void  hello() {
        try {
            TimeUnit.SECONDS.sleep(3);
            System.out.println("数据处理中。。。。");
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
